﻿using System;
using System.IO;

namespace SameAndDifferentLines
{
    class SameAndDifferentLines
    {
        static void Main()
        {
            int totalLines = 0, equal = 0;
            string line, line2;
            string[] files = { "..\\..\\FirstFile.txt", "..\\..\\SecondFile.txt" };

            using (StreamReader firstReader = new StreamReader(files[0]))
            {
                using (StreamReader secondReader = new StreamReader(files[1]))
                {
                    while ((line = firstReader.ReadLine()) != null && (line2 = secondReader.ReadLine()) != null)
                    {
                        if (line == line2)
                        {
                            equal++;
                        }
                        totalLines++;
                    }
                }
            }
            Console.WriteLine("Equal lines: {0}, Different lines: {1}", equal, totalLines - equal);
        }
    }
}
